package com.fjl.cycle;

import com.fjl.factoryBean.MyService;
import com.fjl.factoryBean.MyServiceFactoryBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

public class TestCycle {

	public static void main(String[] args) {
		ApplicationContext ac = new AnnotationConfigApplicationContext("com.fjl");
//		ApplicationContext ac = new AnnotationConfigApplicationContext(ConfigApp.class);
		try {
//			TestA ta = ac.getBean(TestA.class);
//			ta.pr();


			TestB tb1 = ac.getBean(TestB.class);
			tb1.pr();
			TestB tb2 = ac.getBean(TestB.class);
			tb2.pr();



		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
